package com.size.mall;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.alibaba.dubbo.qos.common.Constants;
import com.alibaba.dubbo.qos.server.Server;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan(basePackages = {"com.size.mall.mapper"})
@EnableTransactionManagement
@EnableDubbo
public class ManagerServiceApplication {


    public static void main(String[] args) {
        //

        //配置dubbo.qos.port端口
        System.setProperty(Constants.QOS_PORT, "33000");
        //配置dubbo.qos.accept.foreign.ip是否关闭远程连接
        System.setProperty(Constants.ACCEPT_FOREIGN_IP, "false");
        SpringApplication.run(ManagerServiceApplication.class, args);

        Server.getInstance().stop();
    }

}
